#ifndef __HELLOWORLD_SCENE_H__
#define __HELLOWORLD_SCENE_H__

#include "cocos2d.h"
#include "GameHeart/ADUCar.h"
#include "GameHeart/ADURoad.h"

using namespace cocos2d;

class HelloWorld: public CCLayer {
private:
	float obCarsStartPosY;
	ADUCar* mcar;
	ADURoad *mRoad;
	CCArray* obCars;
public:
	virtual bool init();

	static CCScene* scene();

	void closeCallback(CCObject* pSender);

	virtual void didAccelerate(CCAcceleration* pAccelerationValue);

	void update(float dt); // update function

	void detectCollision(); // Detect Collision between car and moveable

	void if_collision_car_obstacle(); // Process when detect collisioin between car and obstacle
	void if_collision_car_coin(); // Process when detect collision between car and coin
	virtual void keyBackClicked(void);

	void manageObCars(); // Manage add/remove obstacle/coin

	virtual void ccTouchesBegan(CCSet *pTouches, CCEvent *pEvent);

	CREATE_FUNC(HelloWorld)
	;
};

#endif
